home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1989 June
/
1989-06.d64
/
grafix converter
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
5KB
|
139 lines
10 rem copyright 1989 compute! publications, inc. - all rights reserved
20 poke52,88:poke56,88:clr
30 fori=828to863:readj:pokei,j:next
40 fori=1to4:readhi$(i):next:fori=1to7:readmu$(i):next
50 poke53280,.:poke53281,.:l=828:ll=835:lh=837:fl=844:c=847
60 t$(.)="":t$(1)="[158]"
70 print"[147]":fori=1to3:printspc(5)t$(.)" ":next
80 printspc(5)" grafix converter "
90 fori=1to3:printspc(5)t$(.)" ":next
100 print"[145][145]"spc(12)t$(1)" "
110 printspc(12)t$(1)" copyright 1989 "
120 printspc(12)t$(1)" compute! publications,inc "
130 printspc(12)t$(1)" all rights reserved "
140 printspc(12)t$(1)" "
150 print""spc(17)"choose"
160 print"[154]1. hires":print"[153]2. multi":print"[150]3. quit"
170 gosub1370
180 ifa$<"1"ora$>"3"then170
190 a=val(a$):ifa=3thenend
200 print"[147]";:ifa=2then220
210 fori=1to4:printi"[157]. "hi$(i):next:goto230
220 fori=1to7:printi"[157]. "mu$(i):next
230 print" from: ";
240 gosub1370:ifa$<"1"ora$>"7"then240
250 f=val(a$):iff>4anda=1then240
260 ifa=2then280
270 printhi$(f):goto290
280 printmu$(f)
290 print" to: ";
300 gosub1370:ifa$<"1"ora$>"7"then300
310 t=val(a$):ift>4anda=1then300
320 ift=fthen300
330 ifa=2then350
340 printhi$(t):goto360
350 printmu$(t)
360 p$="":input"[147]name of picture";p$:ifp$="_"then70
370 ifp$=""then360
380 e$=p$:x=.
390 ifa=2then410
400 onfgosub890,900,910,920:goto420
410 onfgosub930,970,1040,1050,1060,1070,1080
420 p$=e$:iflen(p$)>16then360
430 print:pokell,x:pokelh,y
440 n$="":input"name of new picture";n$:ifn$="_"then70
450 ifn$=""thenprint"[145][145][145]";:goto440
460 e$=n$:ifa=2then480
470 ontgosub890,900,910,920:goto490
480 ontgosub940,970,1040,1050,1060,1070,1080
490 n$=e$:iflen(n$)>16then440
500 gosub1260
510 gosub1370:ifa$="_"then70
520 ifa$<>chr$(13)then510
530 sysl,p$,8
540 gosub1290:gosub1280
550 gosub1370:ifa$="_"then70
560 ifa$<>chr$(13)then550
570 print" working...":bm=24576:n$=n$+",p,w":ln=.:ifa=2then590
580 onfgosub1090,1100,1110,1120:goto600
590 onfgosub1130,1140,1150,1160,1170,1180,1190
600 ifa=2then620
610 ontgosub640,680,690,700:close2:goto630ady.
620 ontgosub740,750,770,800,820,840,860:close2
630 gosub1290:goto70
640 hn=92:gosub1200:iff=2thenprint"screen...":fori=1to1024:print#2,chr$(1);:next
650 iff=3thenprint"screen...":fori=1to1024:print#2,chr$(16);:next
660 iff=4thengosub1230:nl=24:gosub1210
670 gosub1220:return
680 hn=32:gosub1200:gosub1220:return
690 hn=64:gosub1200:gosub1220:nl=64:gosub1210:return
700 hn=32:gosub1200:gosub1220:iff=1thengosub1230
710 iff=2thenprint"screen...":fori=.to999:print#2,chr$(1);:next
720 iff=3thenprint"screen...":fori=.to999:print#2,chr$(16);:next
730 print#2,chr$(bo);:nl=6:gosub1210:return
740 hn=96:gosub1200:gosub1220:gosub1230:gosub1240:gosub1250:return
750 hn=128:gosub1200:gosub1220:gosub1230:gosub1240
760 print#2,chr$(241);chr$(255);chr$(0);chr$(1);chr$(7);:return
770 hn=64:gosub1200:gosub1220:nl=192:gosub1210:gosub1230
780 nl=24:gosub1210:gosub1240:nl=22:gosub1210
790 print#2,chr$(bo);:gosub1250:return
800 hn=92:gosub1200:gosub1230:nl=24:gosub1210
810 gosub1220:gosub1240:nl=16:gosub1210:return
820 hn=160:gosub1200:gosub1220:nl=64:gosub1210:gosub1250
830 nl=127:gosub1210:gosub1230:nl=24:gosub1210:gosub1240:gosub1210:return
840 hn=32:gosub1200:gosub1220:gosub1230:print#2,chr$(bo);:gosub1250
850 nl=14:gosub1210:gosub1240:return
860 ln=220:hn=24:gosub1200
870 print#2,chr$(abs(254-bg));:nl=19:gosub1210
880 gosub1230:gosub1240:gosub1220:return
890 e$="dd"+e$:y=92:return:doodle
900 e$=e$+".pic":y=96:return:paint now!
910 y=96:return:print shop
920 e$=e$+" ":e$=left$(e$,11)+" pic":y=96:return:art studio, 11 spaces
930 e$="?pic ? "+e$+"*":goto960:koala read
940 e$="[129]pic a "+e$+" "
950 e$=left$(e$,15)+chr$(160)
960 y=96:return
970 q$="":fori=1tolen(e$)
980 r$=mid$(e$,i,1):r=asc(r$):ifr>64thenr=r+32
990 q$=q$+chr$(r):next
1000 ift=2then1020
1010 e$="[crt?>"+q$+"*":goto1030:read
1020 e$="[crt0>"+q$+" ":e$=left$(e$,16)
1030 y=96:return
1040 e$="p-"+e$:y=96:return:artist 64
1050 e$="rp."+e$:y=92:return:rainbow painter
1060 e$="pi."+e$:y=96:return:blazing paddles
1070 e$=e$+" ":e$=left$(e$,12)+"mpic":y=96:return:adv art studio
1080 e$="pic."+e$:x=220:y=88:return:micro illustrator
1090 sc=23552:return:doodle
1100 sc=23552:pokec,1:sysfl:return:paint now!
1110 sc=23552:pokec,16:sysfl:return:print shop
1120 bo=peek(33576):sc=32576:return:art studio
1130 bg=peek(34576):sc=32576:cr=33576:return:koala
1140 bo=2:bg=1:sc=32576:cr=33576:return:garfield
1150 bo=peek(34814):bg=peek(34815):sc=32768:cr=33792:return:artist 64
1160 sc=23552:cr=32576:return:rainbow painter
1170 bg=peek(32640):sc=32768:cr=33792:return:blazing paddles
1180 bo=peek(33576):bg=peek(33577):sc=32576:cr=33592:return:adv art studio
1190 bg=abs(254-peek(22748)):bm=24768:sc=22768:cr=23768:return:micro illustrator
1200 open2,8,2,n$:print#2,chr$(ln);chr$(hn);:return:open file, set load address
1210 print"padding...":fori=1tonl:print#2,chr$(0);:next:return:padding
1220 print"bitmap...":fori=.to7999:print#2,chr$(peek(bm+i));:next:return:bitmap
1230 print"screen...":fori=.to999:print#2,chr$(peek(sc+i));:next:return:screen
1240 print"color...":fori=.to999:print#2,chr$(peek(cr+i));:next:return:color
1250 print"background...":print#2,chr$(bg);:return:background
1260 print"[147] insert source disk, hit <return>"
1270 printspc(12)"hit '_' to abort":return
1280 print" insert destination disk, hit <return>":goto1270
1290 open15,8,15:input#15,er,er$,e1,e2:close15:ifer=0thenreturn
1300 print"[147]disk error: "er;er$;e1;e2:fori=0to2000:nexti:goto70
1310 open15,8,15:close15:i=st:ret
1320 data32,253,174,32,212,225,162,,160,,169,,32,213,255,96
1330 data162,,169,,189,,92,189,,93,189,,94,189,,95,232,208,241,96
1340 datadoodle,paint now!,print shop,art studio
1350 datakoala,create with garfield,artist 64,rainbow painter
1360 datablazing paddles,adv art studio,micro illustrator
1370 geta$:ifa$=""then1370
1380 return